<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改订单表')"/>
                                                                                                                                                                                    <th:block th:include="include :: datetimepicker-css"/>
                                                                                                                                                                                                                                                                                                                                                                                                                    </head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-orders-edit" th:object="${orders}">
                <input name="id" th:field="*{id}" type="hidden">
                                                                                                                                            <div class="form-group">
                            <label class="col-sm-3 control-label">订单编号
                                ：</label>
                            <div class="col-sm-8">
                                <input name="orderNo" th:field="*{orderNo}" class="form-control"
                                       type="text">
                            </div>
                        </div>
                                                                                                                                                                        <div class="form-group">
                            <label class="col-sm-3 control-label">用户ID
                                ：</label>
                            <div class="col-sm-8">
                                <input name="userId" th:field="*{userId}" class="form-control"
                                       type="text">
                            </div>
                        </div>
                                                                                                                                                                        <div class="form-group">
                            <label class="col-sm-3 control-label">店铺ID
                                ：</label>
                            <div class="col-sm-8">
                                <input name="storeId" th:field="*{storeId}" class="form-control"
                                       type="text">
                            </div>
                        </div>
                                                                                                                                                                        <div class="form-group">
                            <label class="col-sm-3 control-label">收货人
                                ：</label>
                            <div class="col-sm-8">
                                <input name="receiverName" th:field="*{receiverName}" class="form-control"
                                       type="text">
                            </div>
                        </div>
                                                                                                                                                                        <div class="form-group">
                            <label class="col-sm-3 control-label">收货地址
                                ：</label>
                            <div class="col-sm-8">
                                <input name="receiverAddress" th:field="*{receiverAddress}" class="form-control"
                                       type="text">
                            </div>
                        </div>
                                                                                                                                                                        <div class="form-group">
                            <label class="col-sm-3 control-label">收货电话
                                ：</label>
                            <div class="col-sm-8">
                                <input name="receiverTel" th:field="*{receiverTel}" class="form-control"
                                       type="text">
                            </div>
                        </div>
                                                                                                                                                                        <div class="form-group">
                            <label class="col-sm-3 control-label">支付方式
                                ：</label>
                            <div class="col-sm-8">
                                <select name="payType" class="form-control m-b"
                                        th:with="type=${@dict.getType('pay_type')}">
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                            th:value="${dict.dictValue}" th:field="*{payType}"></option>
                                </select>
                            </div>
                        </div>
                                                                                                                                                                        <div class="form-group">
                            <label class="col-sm-3 control-label">付款金额
                                ：</label>
                            <div class="col-sm-8">
                                <input name="amount" th:field="*{amount}" class="form-control"
                                       type="text">
                            </div>
                        </div>
                                                                                                                                                                        <div class="form-group">
                            <label class="col-sm-3 control-label">支付状态
                                ：</label>
                            <div class="col-sm-8">
                                <select name="payStatus" class="form-control m-b"
                                        th:with="type=${@dict.getType('pay_status')}">
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                            th:value="${dict.dictValue}" th:field="*{payStatus}"></option>
                                </select>
                            </div>
                        </div>
                                                                                                                                                                        <div class="form-group">
                            <label class="col-sm-3 control-label">订单状态
                                ：</label>
                            <div class="col-sm-8">
                                <select name="orderStatus" class="form-control m-b"
                                        th:with="type=${@dict.getType('order_status')}">
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                            th:value="${dict.dictValue}" th:field="*{orderStatus}"></option>
                                </select>
                            </div>
                        </div>
                                                                                                                                                                        <div class="form-group">
                            <label class="col-sm-3 control-label">备注
                                ：</label>
                            <div class="col-sm-8">
                                <input name="remark" th:field="*{remark}" class="form-control"
                                       type="text">
                            </div>
                        </div>
                                                                                                                                                                                            <div class="form-group">
                            <label class="col-sm-3 control-label">支付时间
                                ：</label>
                            <div class="col-sm-8">
                                <div class="input-group date">
                                    <input name="payTime"
                                           th:value="${#dates.format(orders.payTime, 'yyyy-MM-dd')}"
                                           class="form-control" placeholder="yyyy-MM-dd"
                                           type="text">
                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                </div>
                            </div>
                        </div>
                                                                                                                                                                        <div class="form-group">
                            <label class="col-sm-3 control-label">派送时间
                                ：</label>
                            <div class="col-sm-8">
                                <div class="input-group date">
                                    <input name="deliveryTime"
                                           th:value="${#dates.format(orders.deliveryTime, 'yyyy-MM-dd')}"
                                           class="form-control" placeholder="yyyy-MM-dd"
                                           type="text">
                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                </div>
                            </div>
                        </div>
                                                                                                                                                                        <div class="form-group">
                            <label class="col-sm-3 control-label">完成时间
                                ：</label>
                            <div class="col-sm-8">
                                <div class="input-group date">
                                    <input name="completeTime"
                                           th:value="${#dates.format(orders.completeTime, 'yyyy-MM-dd')}"
                                           class="form-control" placeholder="yyyy-MM-dd"
                                           type="text">
                                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                </div>
                            </div>
                        </div>
                                                                    </form>
</div>
<th:block th:include="include :: footer"/>
                                                                                                                                                                                <th:block th:include="include :: datetimepicker-js"/>
                                                                                                                                                                                                                                                                                                                                                                                                                    <script th:inline="javascript">
    var prefix = ctx + "system/orders";
            $("#form-orders-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-orders-edit').serialize());
        }
    }
                                                                                                                                                                                                                                                                                        
            $("input[name='payTime']").datetimepicker({
                format: "yyyy-mm-dd",
                minView: "month",
                autoclose: true
            });
                                
            $("input[name='deliveryTime']").datetimepicker({
                format: "yyyy-mm-dd",
                minView: "month",
                autoclose: true
            });
                                
            $("input[name='completeTime']").datetimepicker({
                format: "yyyy-mm-dd",
                minView: "month",
                autoclose: true
            });
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    </script>
</body>
</html>